package com.yylc.cscore.util;

import com.yylc.cscore.bean.base.ResultBean;

/**
 * @author xiangnan
 * date 2018/4/27
 */
public class ResultUtil {

    public static ResultBean<Object> success(Object data) {
        return new ResultBean<>(0, "success", data);
    }

    public static ResultBean<Object> error(String msg) {
        return error(msg, null);
    }

    public static ResultBean<Object> error(String msg, Object data) {
        return new ResultBean<>(-1, msg, data);
    }

}
